﻿<include file="Public/head"/>
    <div class="container-fluid">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">添加自定义菜单</h3>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" method="post">
                    <div class="control-group">
                        <label class="control-label">菜单名称</label>
                        <div class="controls">
                            <input type="text" name="name" placeholder="菜单名称">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">上级菜单</label>
                        <div class="controls">
                            <select name="pid">
                                <option value="0">一级菜单</option>
                                <option value="1">百度搜索</option>
                                <option value="2">PHP相关</option>
                                <option value="3">其他</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">类型</label>
                        <div class="controls">
                            <input type="radio" name='type' value="1" checked/>关键字　
                            <input type="radio" name='type' value="2"/>跳转
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">跳转地址/关键字</label>
                        <div class="controls">
                            <input id="key" type="text" placeholder="跳转地址/关键字">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn" onclick='history.go(-1)'>返回</button>
                <button class="btn btn-primary" id="add" onclick="add();">保存</button>
            </div>
    </div>
<include file="Public/foot"/>
<script>
    $("input[type='radio']").click(function(){
        if($(this).val() == 1){
            $('#key').attr('name','key');
        }else{
            $('#key').attr('name','url');
        }
    });
    $('input:checked').click();
</script>
